#pragma once
#include "ALBaseSaliency.h"

class CALSHC : public CALBaseSaliency
{
public:
	CALSHC();
	CALSHC(CALStepItem* pStepItem);
	~CALSHC();

public:
	//https://github.com/abin24/Saliency-detection-toolbox

	virtual void test();
	virtual void convert();
	virtual void convert(const Mat &src, Mat &dst);


public:
	void calculateSaliencyMap(Mat *src, Mat * dst);
private:
	int Quantize(const Mat& img3f, Mat &idx1i, Mat &_color3f, Mat &_colorNum, double ratio = 0.95);
	void	GetHC(const Mat &binColor3f, const Mat &weight1f, Mat &_colorSal);
	void SmoothSaliency(const Mat &binColor3f, Mat &sal1d, float delta, const vector<vector< pair<double, int> >> &similar);

};

